﻿using System;
using System.Linq;
using StartWebForms.Data;

namespace StartWebForms.Person
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            IndexPersons();
        }

        private void IndexPersons()
        {
            this.ltrMessage.Text = "Persons List";

            PersonsDataContext dataContext = new PersonsDataContext();
            this.dlPersons.DataSource = dataContext.Persons.ToList();
            this.dlPersons.DataBind();
        }
    }
}
